72c9f40f2fe7f128bb604d74d06e73cfe417edbc,core/server/src/main/java/alluxio/master/file/FileSystemMasterClientRestServiceHandler.java,FileSystemMasterClientRestServiceHandler,getNewBlockIdForFile,#String#,221
Before Change
public Response getNewBlockIdForFile(@QueryParam("path") String path) {
try {
Preconditions.checkNotNull(path, "required 'path' parameter is missing");
return Response.ok(mFileSystemMaster.getNewBlockIdForFile(new AlluxioURI(path))).build();
} catch (AlluxioException | NullPointerException e) {
LOG.warn(e.getMessage());
return Response.serverError().entity(e.getMessage()).build();
}
}
/**
After Change
public Response getNewBlockIdForFile(@QueryParam("path") String path) {
try {
Preconditions.checkNotNull(path, "required 'path' parameter is missing");
return RestUtils.createResponse(mFileSystemMaster.getNewBlockIdForFile(new AlluxioURI(path)));
} catch (AlluxioException | NullPointerException e) {
LOG.warn(e.getMessage());
return RestUtils.createErrorResponse(e.getMessage());
}
}
/**